package chapter3.test4;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import java.util.ArrayList;
import java.util.List;

@Configuration
@EnableAspectJAutoProxy
public class TrackCounterConfig {


    @Bean
    public CompactDisc blankDisc(){
        BlankDisc cd = new BlankDisc();
        cd.setTitle("title");
        cd.setArtist("artist");
        List<String> tracks = new ArrayList<String>();
        tracks.add("aa");
        tracks.add("bb");
        tracks.add("cc");
        cd.setTracks(tracks);
        return cd;
    }


    @Bean
    public TrackCounter trackCounter(){
        return new TrackCounter();
    }

}
